package com.micronote.provider.entity;

import java.util.HashMap;

import com.micronote.provider.DatabaseHelper;

public class Event {
	
	final static public String GUID = "guid";
	final static public String EVENT_TYPE = "event_type";
	final static public String EVENT_DETAIL = "event_detail";
	
	
	public String mGuid;
	public String mType;
	public String mDetail;
	public long mCreateTime;
	public long mUpdateTime;
	public long mBeginTime;
	public long mIsActive;
	public long mDueTime;
	public long mCompleteTime;
	public String mStatus;
	public String mMemo;
	public String mValue;
	public String mValue1;
	public String mValue2;
	public byte[] data;
	
	static public String create()
	{
		HashMap<String, String> columns = new HashMap<String, String>();
		
		columns.put("guid", "VARCHAR(36) PRIMARY KEY");
		columns.put("event_type", "VARCHAR(255)");
		columns.put("event_detail", "TEXT");
		columns.put("create_time", "INTEGER");
		columns.put("update_time", "INTEGER");
		columns.put("begin_time", "INTEGER");
		columns.put("is_active", "INTEGER");
		columns.put("due_time", "INTEGER");
		columns.put("complete_time", "INTEGER");
		columns.put("status", "VARCHAR(20)");
		columns.put("memo", "TEXT");
		columns.put("value", "INTEGER");
		columns.put("value1", "INTEGER");
		columns.put("value2", "INTEGER");
		columns.put("data", "BLOB");

		return DatabaseHelper.createTable("event", columns);
	}


	static public void addFutureEvent(String eventType, String eventDetail, long beginTime, long dueTime, String memo, String values[])
	{
		
	}
	
	static public void addCompleteEvent(String eventType, String eventDetail, long completeTime, String memo, String values[])
	{
		
	}
	
	static public void addTimeoutEvent(String eventType, String eventDetail, long beginTime, long dueTime, String memo, String values[])
	{
		
	}
	
	public void remove(String eventGuid)
	{
		
	}
	
	public void complete(String eventGuid)
	{
		
	}
}
